package com.stedu.mall.orderservice.mapper;

import com.stedu.mall.common.bean.Order;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {
    int insert(Order order);
    int delete(String id);
    int update(Order order);
    List<Order> selectByCondition(Order condition);
    //id查询
    Order selectById(String id);
    //获取所有订单
    @MapKey("pro")
    List<Map<String, Integer>> selectProCount();


}/*
//查询当前用户已选择的购物车信息
function getCartList() {
  let cartIds = route.query.cartIds;
  cartApi.selectByIds(cartIds)
      .then(resp=>{
        if (resp.code == 10000) {
          cartList.value = resp.data;
          //计算总金额
          cartList.value.forEach(cart => {
            totalPrice.value += cart.goods.price * cart.count;
          });
        } else {
          ElMessage.error(resp.msg);
        }
      });
}

*/
